import os
import logging
from dotenv import find_dotenv,load_dotenv
def get_api_key():
    _ = load_dotenv(find_dotenv())
    try:
        logging.info("successfully get api key")
        return os.environ["ARK_API_KEY"]
    except KeyError:
        print("error")
        logging.error("ARK_API_KEY environment variable is not set.")
        raise